﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using K2CoreLib.DataObject;
using System.Data;
using K2CoreLib.Shared;

namespace K2CoreLib.Dao.Hcs
{
    class ExitChecklistDao
    {
        public List<ExitTypeApproveDto> GetEmpData(string EmpId)
        {
            string storeName = @"K2_spGetAssetApprover_ExitChecklist";
            object[] parms = { "@EmpID", EmpId };

            return HcsDb.ReadListFromStore(storeName, Make, parms);
        }

        private Func<IDataReader, ExitTypeApproveDto> Make = reader =>
            new ExitTypeApproveDto
            {
                ExitTypeID = reader["LSExitTypeID"].AsInt(),
                Approver = reader["Approver"].AsString(),
                Property = reader["Property"].AsBool(),
                ExtNo = reader["ExtNo"].AsString()
            };
    }
}
